<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
	   /* function *show() {
	    	let b = yield;
	    	alert(b)

		    let a =  yield;

		    alert(a);
	    }

	    let gen = show();
	    gen.next(12);//第一个next是没有办法传参的!!,如果要传就只能给函数传参

	    gen.next(5);*/

	   function *show() {
           alert('a');
           yield 12;
           alert('b')
	   }
	   let gen = show();
	   let res1 = gen.next();
	   console.log(res1);//{value:12,done:false} done 表示是否已经完成

	   let res2 = gen.next();
	   console.log(res2);//{value:undefined,done:false}
    </script>
</head>
<body>

</body>
<script>

</script>
</html>